#ifndef CLICKEDLABEL_H
#define CLICKEDLABEL_H

#include "global.h"
#include <QLabel>


class ClickedLabel : public QLabel
{
    Q_OBJECT
public:
    ClickedLabel(QWidget *parent);

    bool setState(ClickLbState state);
    bool setCurState(ClickLbState state);
    void setState(QString normal, QString hover, QString press,QString select, QString select_hover, QString select_press);
    void resetNormalState();

    ClickLbState getCurState() const;

protected:
    void mousePressEvent(QMouseEvent *e) override;
    void mouseReleaseEvent(QMouseEvent* e) override;
    void enterEvent(QEvent* e) override;
    void leaveEvent(QEvent* e) override;

signals:
    void clicked(QString, ClickLbState);

private:
    QString m_normal;
    QString m_normal_hover;
    QString m_normal_press;

    QString m_selected;
    QString m_selected_hover;
    QString m_selected_press;

    ClickLbState m_curstate;
};

#endif // CLICKEDLABEL_H
